import request from "../utils/request"

export function getComments(pid){
    return request({
        method: "get",
        url: `/api/v1/comment/list/${pid}`
    })
}

export function addComment(commentDTO){
    return request({
        method: "post",
        url: "/api/v1/comment/addComment",
        data:{
            userId: commentDTO.userId,
            postId: commentDTO.postId,
            content: commentDTO.content,
            username: commentDTO.username,
        }
    })
}